import { defineStore } from "pinia";
import { store } from "@/stores";
// import { encryptByDES } from '/@/utils/crypto';
interface UserState {
  token: string;
  auths: string[];
}

export const useUserStore = defineStore({
  id: "app-user",
  state: (): UserState => ({
    // token
    token: "123123",
    // auths
    auths: []
  }),
  getters: {
    getToken(): string {
      return this.token;
    }
  },
  actions: {
  }
});

// Need to be used outside the setup
export function useUserStoreWithOut() {
  return useUserStore(store);
}
